﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using Presentation.Services;

namespace Presentation
{
    public class ProxyClient : DependencyObject
    {
        #region Singleton

        private static  ProxyClient _instance;
        private static  ProxyClient Instance
        {
            get { return _instance ?? (_instance = new ProxyClient()); }
        }

        #endregion

        public static readonly DependencyProperty CurrentUserProperty =
                    DependencyProperty.Register("CurrentUser", 
                            typeof(string), 
                            typeof(ProxyClient), 
                            new FrameworkPropertyMetadata("N/A"));

        private readonly SignalementManagementRemoteServiceClient _internalClient;
        private string _currentUser;

        private ProxyClient()
        {
            _internalClient = new SignalementManagementRemoteServiceClient();
        }

        public static SignalementManagementRemoteServiceClient Client
        {
            get { return Instance._internalClient; }
        }

        public static string CurrentUser
        {
            get { return Instance._currentUser; }
            set { Instance._currentUser = value; }
        }


        //public string CurrentUser
        //{
        //    get { return (string)GetValue(CurrentUserProperty); }
        //    set { SetValue(CurrentUserProperty, value); }
        //}



        

    }
}
